#ifndef BARRAGEEDIT_H
#define BARRAGEEDIT_H

#include <QWidget>
#include <QLineEdit>
#include <QPushButton>
#include "login.h"

class BarrageEdit : public QLineEdit
{
    Q_OBJECT
public:
    explicit BarrageEdit(QWidget *parent = nullptr);

    // 鼠标在编辑框中点击时
    virtual void mousePressEvent(QMouseEvent* event) override;

private slots:
    // 发送弹幕按钮点击
    void onSendBulletScreenBtn();

signals:
    // 通知PlayerPage发送该条弹幕
    void sendBulletScreen(const QString& text);

private:
    QPushButton* sendBSBtn;
    Login* login;
};

#endif // BARRAGEEDIT_H
